package com.yyy.lambda;

import java.util.function.BiConsumer;

public class TestObjMethod {

    public static void main(String[] args) {


        BiConsumer<Too2, String> c1 = (too2, str) -> new Too2().fo(str);
        c1.accept(new Too2(), "hello");
        System.out.println();
    }


    static class Too2 {

        private String name;

        public void foo() {
            System.out.println("invoking foo function...");
        }

        public void getFo() {
            System.out.println("我的名字" + name);
        }

        public void fo(String str) {
            name = str;
        }
    }


}
